﻿@if (ViewData.TemplateInfo.TemplateDepth > 1)
{
	@ViewData.ModelMetadata.SimpleDisplayText
}
else
{
	foreach (var property in ViewData.ModelMetadata.Properties.Where(p => p.ShowForEdit && !ViewData.TemplateInfo.Visited(p)).OrderBy(p => p.Order))
	{
		if (property.HideSurroundingHtml)
		{
			@Html.Editor(property.PropertyName)
		}
		else
		{
			@Html.EditorGroup(property.PropertyName)
		}
	}
}